<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/config.inc.php');
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/top.inc.php');

//get num_rows currently in buildings table
$building_id = mysql_real_escape_string(strip_tags($_GET['bid']));
$classroom_id = mysql_real_escape_string(strip_tags($_GET['id']));

$get_building_data = mysql_query("SELECT * FROM buildings WHERE id = $building_id");
$building_name = mysql_result($get_building_data,0,'building_name');
$abbreviation = mysql_result($get_building_data,0,'abbreviation');

echo "<p>";
	echo "<a href='index.php?id=$building_id'>&lt;&lt; Back to Classrooms Portal</a><br />";
echo "</p>";
echo "<h1>Delete Classroom in $building_name</h1>";

$i = 0;

//select statement
$query="SELECT * FROM classrooms WHERE id='$classroom_id'";
$result = mysql_query($query);

//close
mysql_close();

$room_num=mysql_result($result,$i,"room_num");

echo "<p>";
echo "Are you sure you want to delete <b>$abbreviation $room_num?</p>";

echo "<form action='delete_do.php' method='post'>";
echo "<input type='hidden' name='bid' value='$building_id'>";
echo "<input type='hidden' name='id' value='$classroom_id'>";
echo "<p><input type='submit' value='Yes'></p>";
echo '</form>';

?>
<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/bottom.inc.php');
?>